package com.lzy.pattern.singleton.demo6;

/**
 * @ClassName: Client
 * @Description: 单例设计模式测试：饿汉模式，线程安全，枚举方式
 * @Author: LiuZy
 * @Date: 2022/4/9 19:32
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        for (int i = 0; i < 100; i++) {
            new Thread(new Runnable() {
                @Override
                public void run() {
                    Singleton instance = Singleton.INSTANCE;
                    instance.hello();
                    System.out.println(instance.hashCode());
                }
            }).start();
        }
    }
}